package com.utm.gameoka;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class Conexion {

	private Context fileContent;

	public Conexion(Context Content) {
		this.fileContent = Content;
	}

	public boolean tieneInternet() {
		boolean enabled = true;

		ConnectivityManager connectivityManager = (ConnectivityManager) fileContent
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo info = connectivityManager.getActiveNetworkInfo();

		if ((info == null || !info.isConnected() || !info.isAvailable())) {
			enabled = false;
		}
		return enabled;
	}

}
